EE6310 - Image and Video Processing, HW3

1. 2D-DFT

Imports and basic setup

1.1 DFT as a summation over two dimensions

1.2 DFT using complex exponential matrix

1.1 Display the image, its DFT magnitude, phase, DFT magnitude subject to the logarithmic transformation

1.2 Generate DFT using (-1)^(i+j) I and display its magnitude

1.3 Verify that IDFT(DFT(I)) = I

Above, we can see that IDFT(DFT(I)) = I for all the images

1.4 Show the importance of phase by transposing the phase matrix and then synthesizing the image. Repeat by

a) setting the phase to 0

b) by adding noise.

Above, we can see that some of the features remain even after adding noise to the phase matrix

2. Peroidic Convolution

2.1 Circulary convolve two images. Test your program by using an image and an averaging filter of size 5 × 5.

2.2 Linearly convolve the same image and filter using the circular convolution function above after appropriate zero padding.

2.3 Now, verify that you can perform linear covolution using the DFT of zero padded images.

Hence, we can perform linear convolution using the DFT of zero padded images.

3. Image Denoising using Linear Filters

3.1 Average filter of size M × M. Vary M from 3 to 15 in increments of 2 and observe the tradeoff between denoising and smoothing. What could be an appropriate window size for this noise level?

From above, as the filter size increases, the noise level decreases and the image becomes softer. In my opinion the window size should be around 3x3 for a good blend of smoothing and denoising even though any kind of denoising will be a loss of information and sharpness.

3.2 Gaussian filter of size 5 × 5. Experiment with the standard deviation σh of the filter from 0.5 to 5 in steps of 0.5 and observe its effect on denoising.

From above, honestly, I cannot see the difference in the pictures.